import { GY1ModalComponent } from '@app/pipeline/shared/工艺类/正常节点/gy1.component';
import { RW2ModalComponent } from '@app/pipeline/shared/任务类/正常节点/rw2.component';
import { ZL1ModalComponent } from '@app/pipeline/shared/质量类/正常节点/zl1.component';
import { YL2ModalComponent } from '@app/pipeline/shared/原材料类/正常节点/yl2.component';
import { YL10ModalComponent } from '@app/pipeline/shared/原材料类/正常节点/yl10.component';
import { GXZXModalComponent } from '@app/pipeline/shared/工序执行类/正常节点/gxzx.component';
import { ZL4ModalComponent } from '@app/pipeline/shared/质量类/正常节点/zl4.component';
import { ZL5ModalComponent } from '@app/pipeline/shared/质量类/正常节点/zl5.component';
import { ZL6ModalComponent } from '@app/pipeline/shared/质量类/正常节点/zl6.component';
import { GZ1ModalComponent } from '@app/pipeline/shared/工装类/正常节点/gz1.component';
import { GZ2ModalComponent } from '@app/pipeline/shared/工装类/正常节点/gz2.component';
import { SB1ModalComponent } from '@app/pipeline/shared/设备类/正常节点/sb1.component';
import { SB2ModalComponent } from '@app/pipeline/shared/设备类/正常节点/sb2.component';
import { GJ1ModalComponent } from '@app/pipeline/shared/工具类/正常节点/gj1.component';
import { GJ2ModalComponent } from '@app/pipeline/shared/工具类/正常节点/gj2.component';
import { LJ2ModalComponent } from '@app/pipeline/shared/量具类/正常节点/lj2.component';
import { LJ1ModalComponent } from '@app/pipeline/shared/量具类/正常节点/lj1.component';
import { RW7ModalComponent } from '@app/pipeline/shared/任务类/正常节点/rw7.component';
import { CB1ModalComponent } from '@app/pipeline/shared/成本类/正常节点/cb1.component';
import { CB2ModalComponent } from '@app/pipeline/shared/成本类/正常节点/cb2.component';
import { CB3ModalComponent } from '@app/pipeline/shared/成本类/正常节点/cb3.component';
import { CB4ModalComponent } from '@app/pipeline/shared/成本类/正常节点/cb4.component';
import { CB5ModalComponent } from '@app/pipeline/shared/成本类/正常节点/cb5.component';
import { XC11ModalComponent } from '@app/pipeline/shared/现场问题处理类/正常节点/xc11.component';
import { FL1ModalComponent } from '@app/pipeline/shared/辅助物质类/正常节点/fl1.component';
import { DA1ModalComponent } from '@app/pipeline/shared/档案类/正常节点/da1.component';
import { YL1ModalComponent } from './原材料类/正常节点/yl1.component';
import { RW21ModalComponent } from './任务类/正常节点/rw21.component';
import { RW23ModalComponent } from './任务类/正常节点/rw23.component';
import { RW4ModalComponent } from './任务类/正常节点/rw4.component';
import { RW24ModalComponent } from './任务类/正常节点/rw24.component';
import { ActCommonModalComponent } from './act-common.component';
import { GY03ModalComponent } from '@app/pipeline/shared/工艺类/正常节点/gy03.component';

export class ComponentConfig {
    private config = {
        GY1: { component: GY1ModalComponent, modalSize: 'modal-xl' },
        RW2: { component: RW2ModalComponent, modalSize: '' },
        RW4: { component: RW4ModalComponent, modalSize: '' },
        RW21: { component: RW21ModalComponent, modalSize: '' },
        RW23: { component: RW23ModalComponent, modalSize: '' },
        RW24: { component: RW24ModalComponent, modalSize: '' },
        ZL1: { component: ZL1ModalComponent, modalSize: '' },
        YL1: { component: YL1ModalComponent, modalSize: 'modal-xxl' },
        YL2: { component: YL2ModalComponent, modalSize: 'modal-xl' },
        YL10: { component: YL10ModalComponent, modalSize: 'modal-lg' },
        GXZX: { component: GXZXModalComponent, modalSize: 'modal-xxl' },
        ZL4: { component: ZL4ModalComponent, modalSize: '' },
        ZL5: { component: ZL5ModalComponent, modalSize: '' },
        ZL6: { component: ZL6ModalComponent, modalSize: '' },
        GZ1: { component: GZ1ModalComponent, modalSize: '' },
        GZ2: { component: GZ2ModalComponent, modalSize: '' },
        SB1: { component: SB1ModalComponent, modalSize: '' },
        SB2: { component: SB2ModalComponent, modalSize: '' },
        GJ1: { component: GJ1ModalComponent, modalSize: '' },
        GJ2: { component: GJ2ModalComponent, modalSize: '' },
        LJ2: { component: LJ2ModalComponent, modalSize: '' },
        LJ1: { component: LJ1ModalComponent, modalSize: '' },
        RW7: { component: RW7ModalComponent, modalSize: '' },
        CB1: { component: CB1ModalComponent, modalSize: '' },
        CB2: { component: CB2ModalComponent, modalSize: '' },
        CB3: { component: CB3ModalComponent, modalSize: '' },
        CB4: { component: CB4ModalComponent, modalSize: '' },
        CB5: { component: CB5ModalComponent, modalSize: '' },
        XC11: { component: XC11ModalComponent, modalSize: '' },
        FL1: { component: FL1ModalComponent, modalSize: '' },
        DA1: { component: DA1ModalComponent, modalSize: '' },
        GY03: { component: GY03ModalComponent, modalSize: 'modal-xl' }
    };

    getComponentByName(name: string) {
        name = name.toUpperCase();
        if (name.startsWith('GXZX')) {
            name = 'GXZX';
        }
        if (this.config.hasOwnProperty(name)) {
            return this.config[name];
        } else {
            return { component: ActCommonModalComponent, modalSize: '' };
        }
    }
}
